package com.mdxx.xczd.ui.model;

import com.mdxx.xczd.api.ApiManage;
import com.mdxx.xczd.base.baserx.RxSchedulers;
import com.mdxx.xczd.bean.BarCodeBeanResult;
import com.mdxx.xczd.bean.BindStateResult;
import com.mdxx.xczd.ui.contract.FirstContract;
import com.mdxx.xczd.utils.NetworkUtil;
import com.orhanobut.logger.Logger;
import rx.Observable;

/**
 * Created by MD-02 on 2017/2/6.
 */

public class FirstModel implements FirstContract.Model {
    @Override
    public Observable<BarCodeBeanResult> getBarCodeData() {
        Logger.d("BarCodeBeanResult");
        return ApiManage.getInstence()
                .getApiService1()
                .getBarCodeData(NetworkUtil.getAndroid_id(), "0", "iphone7", "custom")
                .compose(RxSchedulers.<BarCodeBeanResult>io_main());
    }

    @Override
    public Observable<BindStateResult> getBindState() {
        return ApiManage.getInstence()
                .getApiService()
                .getBindState(NetworkUtil.getAndroid_id())
                .compose(RxSchedulers.<BindStateResult>io_main());
    }
}
